#pragma once

#include "CSocket.h"


class CSocketIp4 : public CSocket {
public:
	// Miscellaneous operations about local IP addresses
	bool isIpAddressPrivate( const char *p_ip );
	std::vector<std::string> getLocalIpAddresses();
	std::vector<std::string> dnsResolve( const char *p_nameToResolve );
	std::string getLocalEndpointIp();
	unsigned short getLocalEndpointPort();

	// TCP operations
	void connect( const char *p_remoteAddress, unsigned short p_remotePort, unsigned int p_milliseconds );
	CSocket *accept();

	// TCP server operations
	void server( unsigned short p_localPort, unsigned short p_maxConnections, int p_socketType = SOCK_STREAM, int p_protocol = IPPROTO_TCP, const char *p_ipToBind = "" );
};
